]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Use globals for delays and animation times
authorverdre <verdre@v0yd.nl>
Mon, 19 Nov 2018 11:28:28 +0000 (12:28 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 31 Jan 2019 17:36:25 +0000 (17:36 +0000)
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346

js/ui/workspace.js

index f3b557e7e918d3b12387a9d42275df73cc99fe91..6e3be18a6247408ce3640670de1da13ebd19a99b 100644 (file)
@@ -22,8 +22,11 @@ var WINDOW_DND_SIZE = 256;
 
 var WINDOW_CLONE_MAXIMUM_SCALE = 1.0;
 
+var WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT = 750;
 var CLOSE_BUTTON_FADE_TIME = 0.1;
 
+var WINDOW_REPOSITIONING_DELAY = 750;
+
 var DRAGGING_WINDOW_OPACITY = 100;
 
 // When calculating a layout, we calculate the scale of windows and the percent
@@ -674,7 +677,7 @@ var WindowOverlay = class {
 
     _onHideChrome() {
         if (this._idleToggleCloseId == 0) {
-            this._idleToggleCloseId = Mainloop.timeout_add(750, this._idleToggleCloseButton.bind(this));
+            this._idleToggleCloseId = Mainloop.timeout_add(WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleToggleCloseButton.bind(this));
             GLib.Source.set_name_by_id(this._idleToggleCloseId, '[gnome-shell] this._idleToggleCloseButton');
         }
     }
@@ -1477,7 +1480,7 @@ var Workspace = class {
         this._cursorY = y;
 
         this._currentLayout = null;
-        this._repositionWindowsId = Mainloop.timeout_add(750,
+        this._repositionWindowsId = Mainloop.timeout_add(WINDOW_REPOSITIONING_DELAY,
             this._delayedWindowRepositioning.bind(this));
         GLib.Source.set_name_by_id(this._repositionWindowsId, '[gnome-shell] this._delayedWindowRepositioning');
     }